package com.jian.mygame;

class ResourceInfo extends Object {
	int mImageID;
	int mShapeType;
	float mDensity;
	float mFriction;
	float mRestitution;
	int mSoundID;
	InitPos mInitPos;
	
	public ResourceInfo(int imageID, int type, float density, float friction, float restitution, int soundid, InitPos initpos ) {
		mImageID = imageID;
		mShapeType = type;
		mDensity = density;
		mFriction = friction;
		mRestitution = restitution;
		mSoundID = soundid;
		mInitPos = initpos;
	}
};

class InitPos extends Object {
	float mPosX;
	float mPosY;
	float mAngle;
	
	public InitPos( float x, float y, float angle) {
		mPosX = x;
		mPosY = y;
		mAngle = angle;
	}
	
	public InitPos() {
		mPosX = 0.0f;
		mPosY = 0.0f;
		mAngle = 0.0f;
	}
};

class AnimationInfo extends Object {
	int mResID; 
	int mHeight;
	int mWidth;
	int mFps;
	int mFrameCount;
	
	public AnimationInfo(int resid, int height, int width, int fps, int framecount) {
		mResID = resid;
		mHeight = height;
		mWidth = width;
		mFps = fps;
		mFrameCount = framecount;
	}
}

class MyFactory extends Object {
	public static final int TOOL_TYPE_CIRCLE = 0;
	public static final int TOOL_TYPE_BOX = 1;
	
	public static final ResourceInfo[] mEnviromentRes= {
		//        ImageID                  			SHAPE TYPE            Density		Friction	Restitution     Sound
		new ResourceInfo (0,						TOOL_TYPE_BOX,		  2.0f,		    1.0f,		0f,			    0,				new InitPos() ),
		new ResourceInfo (0,	    				TOOL_TYPE_BOX,		  2.0f,	  	    1.0f,		0f,			    0,				new InitPos() ),
	};
	
	public static final ResourceInfo[] mTargetRes= {
		//        ImageID                  			SHAPE TYPE            Density		Friction	Restitution     Sound
		new ResourceInfo (R.drawable.redroundbird,	TOOL_TYPE_CIRCLE,		4.0f,		2.0f,		0.5f,			R.raw.bird1,	new InitPos() ),
		new ResourceInfo (R.drawable.greenbird,    	TOOL_TYPE_CIRCLE,		4.0f,	  	2.0f,		0.3f,			R.raw.bird2,	new InitPos() ),
		new ResourceInfo (R.drawable.redbird,      	TOOL_TYPE_BOX,			2.0f,		1.0f,		0.4f,			R.raw.bird2,	new InitPos() ),
		//new ResourceInfo (R.drawable.plane_small,  	TOOL_TYPE_BOX,			4.0f,		2.0f,		0.1f,			0,				new InitPos() )
	};
	
	public static final int BULLET_TYPE0 = 0;
	public static final int BULLET_TYPE1 = 1;
	public static final ResourceInfo[] mBulletRes= {
		//        ImageID             				SHAPE TYPE            Density		Friction	Restitution 	Sound
		new ResourceInfo (R.drawable.bomb, 			TOOL_TYPE_CIRCLE,		10.0f,		2.0f,		0.01f,			R.raw.explosion1,	new InitPos()),
		//new ResourceInfo (R.drawable.bullet, 		TOOL_TYPE_BOX,			5.0f,		2.0f,		0.01f,			R.raw.explosion1,	new InitPos()),
		//new ResourceInfo (R.drawable.bullet2, 		TOOL_TYPE_BOX,			5.0f,		2.0f,		0.01f,			R.raw.explosion1,	new InitPos())
	};
	
	public static final ResourceInfo[] mToolRes= {
		//        ImageID                  			SHAPE TYPE            Density		Friction	Restitution     Sound
		//new ResourceInfo (R.drawable.tool1,      	TOOL_TYPE_BOX,			3.0f,		1.0f,		0.15f,			0,				new InitPos(300f, 150f, 0.0f )),
		//new ResourceInfo (R.drawable.tool1,      	TOOL_TYPE_BOX,			3.0f,		1.0f,		0.15f,			0,				new InitPos(400f, 50f, 0.0f ))

	};
	
	public static final AnimationInfo[] mAnimationRes= {
		new AnimationInfo ( R.drawable.explosion_50h, 50, 50, 14, 7),
		new AnimationInfo ( R.drawable.explosion, 32, 32, 14, 7)
	};
	
	public static final int mMapResID[] = {
		R.drawable.gam_bg,
		R.drawable.grass
	};
	
	public MyFactory(){
		
	}
}
